package cn.edu.guet.service.personifm.impl;

import cn.edu.guet.bean.personimf.*;
import cn.edu.guet.mapper.person.personMapper;
import cn.edu.guet.service.personifm.personimfseritf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class personimfserimpl implements personimfseritf {
    @Autowired
    private personMapper personMapper;

    @Override
    public List<dgroup_lj> getdgroup(String userid) {
        return personMapper.getgroup(userid);


    }

    @Override
    public List<grouppeople> getgrouppeople(grouppeople grouppeople) {
        return personMapper.getgrouppeople(grouppeople);
    }

    @Override
    public List<grouppeople> getpeopleById(String userid, String username) {
        return personMapper.getpeopleById(userid,username);

    }

    @Override
    public Users getUser(String userid) {
        return personMapper.getUser(userid);


    }

    @Override
    public void changeUser(Users user) {
        personMapper.changeUser(user);

    }

    @Override
    public Macollege getMajor(String mname) {
        return personMapper.getMajor(mname);


    }

    @Override
    public college getCollege(String cname) {
        return personMapper.getCollege(cname);
    }

    @Override
    public Macollege getMacollege(String mname, String cname) {
        return personMapper.getMacollege(mname,cname);
    }

    @Override
    public Users checkOldPassword(String userid, String password) {
        return personMapper.checkOldPassword(userid,password);

    }

    @Override
    public Users checkEmail(String userid, String email) {
        return personMapper.checkEmail(userid,email);

    }

    @Override
    public void changePassword(String userid,String password) {
        personMapper.changePassword(userid,password);
    }

    @Override
    public List<dgroup_lj> showGroup(int page) {
        return personMapper.showGroup(page);
    }

    @Override
    public int countGroup() {
        return personMapper.countGroup();
    }

    @Override
    public void outgroup(String userid) {
        personMapper.outgroup(userid);
    }

    @Override
    public List<dgroup_lj> getgroupById(String gid) {
        return  personMapper.getgroupById(gid);
    }

    @Override
    public void creategroup(dgroup_lj dgroup) {
        personMapper.creategroup(dgroup);
    }

    @Override
    public void updataimg(String userid, String imgdata) {
        personMapper.updataimg(userid,imgdata);
    }

    @Override
    public String showhphoto(String userid) {
        return personMapper.showhphoto(userid);
    }

    @Override
    public void updataadm(String userid, String gid) {
        personMapper.updataadm(userid,gid);
    }

    @Override
    public void updatareqimf(String muserid, String cuserid) {
        personMapper.updatareqimf(muserid,cuserid);
    }

    @Override
    public String getmuseById(String gid) {
        return  personMapper.getmuseById(gid);
    }
    @Override
    public List<Users> getjoinname(Users users) {
        return personMapper.getjoinname(users);
    }

    @Override
    public void updatacumgid(String cuserid, String gid) {
        personMapper.updatacumgid(cuserid,gid);
    }

    @Override
    public void deletemes(String muserid, String cuserid) {
        personMapper.deletemes(muserid,cuserid);
    }

    @Override
    public int makejoinimf(String muserid) {
        return personMapper.makejoinimf(muserid);
    }

    @Override
    public String getgid(String muserid) {
        return personMapper.getgid(muserid);
    }

    @Override
    public String getrole(String userid) {
        return  personMapper.getrole(userid);
    }

    @Override
    public void updatarole(String stunumber) {
        personMapper.updatarole(stunumber);

    }

    @Override
    public void updatarole1(String userid) {
        personMapper.updatarole1(userid);
    }

    @Override
    public Users selectBynum(String stunumber) {
        return personMapper.selectBynum(stunumber);
    }

    @Override
    public String getgroupByName(String gname) {
        return personMapper.getgroupByName(gname);
    }

    @Override
    public int getgcount(String userid) {
        return personMapper.getgcount(userid);
    }

    @Override
    public int getgcountBygid(String gid) {
        return  personMapper.getgcountBygid(gid);
    }

    @Override
    public void cmupdatareqimf(String muserid, String cuserid, String decide) {
        personMapper.cmupdatareqimf(muserid,cuserid,decide);
    }

    @Override
    public List<Users> getgnameByuserid(Users users) {
        return  personMapper.getgnameByuserid(users);
    }

    @Override
    public String deletephoto(String userid) {
        return personMapper.deletephoto(userid);
    }


}
